import { http } from '@/utils/http'

/**
 * 判断是否在指定区域
 * @param longitude 经度
 * @param latitude 纬度
 * @returns
 */
export const locationInAreaAPI = (longitude: number, latitude: number) => {
  return http<Boolean>({
    method: 'GET',
    url: `/location/in-area`,
    data: { longitude, latitude },
  })
}

/**
 * 判断选择的地址是否在指定区域
 */
export const checkSelectedAddressInAreaAPI = (id: string) => {
  return http<Boolean>({
    method: 'GET',
    url: `/location/address-in-area`,
    data: { id },
  })
}
